<template>
    <div>
        banner
        <button @click="showRootAndParent">show Msg</button>
        <button @click="parentTodo">click parent todo</button>
        <button @click="rootTodo">click root todo</button>
    </div>
</template>

<script>
export default {
    methods: {
        showRootAndParent() {
            console.log(this.$parent.msg);
            console.log(this.$root.rootMsg);
        },
        parentTodo() {
            this.$parent.sayHello()
        },
        rootTodo() {
            this.$root.rootMethod()
        }

    },
}
</script>

<style lang="scss" scoped>
</style>